<?php
error_reporting(E_WARNING);
include_once '../includes/metodos.php';
connectSql();
checkUser();

$query = mysql_query("SELECT * FROM tb_cliente ORDER BY nome ASC");
echo '<a href="http://localhost/CPIF/painel.php">Voltar</a><br><br><br>';
echo '<a href="new.php">Adicionar</a><br><br>';
echo '<table border="1px">
			<thead>
				<tr>
					<td width="200px"><strong>Cliente:</strong></td>
					<td><strong>Contato:</strong></td>
					<td><strong>A&ccedil;&atilde;o:</strong></td>
				</tr>
			</thead>';
while($row = mysql_fetch_array($query)){
	echo '<tr><td>'.$row['nome'].' '.$row['sobrenome'].'</td><td>'.$row['telefone'].' / '.$row['celular'].'</td><td>
				<form action="edit.php" method="post"><input type="hidden" name="id" value="'.$row['id'].'"/><input type="submit" value="Editar"/></form></td></tr>';
}
echo '</table>';